A charging circuit is used to control the charging process of a battery. Because of the diversified power supply and batteries, multiple variables, e.g., an input voltage (power supply voltage), an input current (power supply current), an output voltage (battery voltage) and an output current (charging current) and so on should be involved in the control of the charging process. FIG. 1 schematically shows a charging circuit 10 used with a BUCK converter. The charging circuit 10 comprises several control circuits, e.g., an input voltage control circuit, an input current control circuit, an output voltage control circuit and an output current control circuit and so on, wherein each control circuit has a specific amplifier and a compensation circuit. The operation of the charging circuit 10 is explained with the example of the output voltage control circuit. In every switching cycle, a clock signal CLK sets a RS flip-flop FF0 to generate a switching signal PWM to turn ON a high-side power switch PM1 and to turn OFF a low-side power switch PM2. Then a current drawn from the power supply of the charging circuit 10 flows through an inductor L1 to charge a battery which is represented by a resistor RL, and in the mean time, an output capacitor Cout is charged. As a result, the output voltage Vout and a feedback signal Vx1 indicative of the output voltage Vout increase. An error amplifier A1 receives the feedback signal Vx1 and a reference signal REF1 to generate an error amplified signal Vcom1 which is also referred as a feedback control signal, wherein the error amplified signal Vcom1 decreases as the feedback signal Vx1 increases. When the error amplified signal Vcom1 decreases to a peak control signal PK, a comparator CP generates a signal to reset the RS flip-flop FF0, so as to generate the switching signal PWM to turn OFF the high-side power switch PM1 and to turn ON the low-side power switch PM2. Then, instead of the power supply, the output capacitor Cout supplies power to the resistor RL, and the output voltage Vout decreases. When the RS flip-flop is set by the clock signal CLK again in the next switching cycle, the operation repeats.
In the charging circuit 10 in FIG. 1, each control circuit needs an error amplifier with high accuracy and high speed, and also needs a compensation circuit to stabilize the whole control circuit. As a result, the circuit is complicated and inefficiency. Meanwhile, each compensation circuit needs to be redesigned according to the different spec of different systems. Furthermore, the error amplified signal Vcom1˜Vcomn of different control circuits are usually very close to each other, so the error switching may happens, or there may be more than one control circuits are working.